<%#
  ========================================================= #
  This file is a part of { Black Hat Ruby } book lab files. #
  ========================================================= #
  Author:
    Sabri | @KINGSABRI
  Description:
    A vlnerable Web Application with Blind Stored XSS
  Requirements:
    gem install sinatra rerun
    ruby contact-us.rb
%>

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
* {box-sizing: border-box;}

input[type=text], select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-top: 6px;
    margin-bottom: 16px;
    resize: vertical;
}
input[type=submit] {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
input[type=submit]:hover {
    background-color: #45a049;
}
.container {
    border-radius: 5px;
    background-color: #f2f2f2;
    padding: 20px;
}
</style>
</head>

<body>

<div class="container">
  <h1>Welcome to Black Hat Ruby!</h1>
</div>

<div align="left"><p><a href="/login"><b>Login</b></a></p></div>

<h2>Contact Us</h2>

<div class="container">
  <form method="POST" action="/contact">
    <label for="fname">First Name</label>
    <input type="text" name="firstname" value="<%= @firstname %>" placeholder="Your name..">

    <label for="lname">Last Name</label>
    <input type="text" name="lastname"  value="<%= @lastname %>"  placeholder="Your last name..">

    <label for="message">Message</label>
    <textarea          name="message"   value="<%= @message %>"   placeholder="Write something.." style="height:200px"></textarea>

    <input type="submit" value="Submit">
  </form>
</div>

</body>
</html>
